#!/usr/bin/env python
# coding: utf-8
from matplotlib.pyplot import *

fin=open('time_err.dat')
todo=fin.read().split('\n')
xs=[float(x.split()[0]) for x in todo if x]
ys=[float(x.split()[1]) for x in todo if x]
yerr=[float(x.split()[2]) for x in todo if x]
title("Tiempo de ejecucion de $flood$")
xlabel("Tamano de entrada")
ylabel("Tiempo de ejecucion")
errorbar(xs,ys,yerr,marker='_',color='k',ls='None')
plot(xs,[x*.00000035+.00004 for x in xs],label=r"$c \times n$")
legend(loc=0)
savefig('ej2_times.png',dpi=640./8)
show()
